# Copyright 2010 Michael Murr
#
# This file is part of LibForensics.
#
# LibForensics is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# LibForensics is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with LibForensics.  If not, see <http://www.gnu.org/licenses/>.

"""Shared constants for various Microsoft Office products."""

__docformat__ = "restructuredtext en"
__all__ = [
    "PIDSI_CODEPAGE", "PIDSI_TITLE", "PIDSI_SUBJECT", "PIDSI_AUTHOR",
    "PIDSI_KEYWORDS", "PIDSI_COMMENTS", "PIDSI_TEMPLATE", "PIDSI_LAST_AUTHOR",
    "PIDSI_REV_NUMBER", "PIDSI_EDIT_TIME", "PIDSI_LAST_PRINTED_TIME",
    "PIDSI_CREATE_TIME", "PIDSI_SAVE_TIME", "PIDSI_PAGE_COUNT",
    "PIDSI_WORD_COUNT", "PIDSI_CHAR_COUNT", "PIDSI_THUMBNAIL",
    "PIDSI_APP_NAME", "PIDSI_DOC_SECURITY","PIDDSI_CODEPAGE",
    "PIDDSI_CATEGORY", "PIDDSI_PRESFORMAT", "PIDDSI_BYTECOUNT",
    "PIDDSI_LINECOUNT", "PIDDSI_PARACOUNT", "PIDDSI_SLIDECOUNT",
    "PIDDSI_NOTECOUNT", "PIDDSI_HIDDENCOUNT", "PIDDSI_MMCLIPCOUNT",
    "PIDDSI_SCALE", "PIDDSI_HEADINGPAIR", "PIDDSI_DOCPARTS", "PIDDSI_MANAGER",
    "PIDDSI_COMPANY", "PIDDSI_LINKSDIRTY", "PIDDSI_CCHWITHSPACES",
    "PIDDSI_SHAREDDOC", "PIDDSI_LINKBASE","PIDDSI_HLINKS",
    "PIDDSI_HYPERLINKSCHANGED", "PIDDSI_VERSION", "PIDDSI_DIGSIG",
    "PIDDSI_CONTENTTYPE", "PIDDSI_CONTENTSTATUS", "PIDDSI_LANGUAGE",
    "PIDDSI_DOCVERSION",

    "PIDSI", "PIDDSI", "SUMMARY_INFORMATION_NAME",
    "DOC_SUMMARY_INFORMATION_NAME"
]

PIDSI_CODEPAGE = 1
PIDSI_TITLE = 2
PIDSI_SUBJECT = 3
PIDSI_AUTHOR = 4
PIDSI_KEYWORDS = 5
PIDSI_COMMENTS = 6
PIDSI_TEMPLATE = 7
PIDSI_LAST_AUTHOR = 8
PIDSI_REV_NUMBER = 9
PIDSI_EDIT_TIME = 0xA
PIDSI_LAST_PRINTED_TIME = 0xB
PIDSI_CREATE_TIME = 0xC
PIDSI_SAVE_TIME = 0xD
PIDSI_PAGE_COUNT = 0xE
PIDSI_WORD_COUNT = 0xF
PIDSI_CHAR_COUNT = 0x10
PIDSI_THUMBNAIL = 0x11
PIDSI_APP_NAME = 0x12
PIDSI_DOC_SECURITY = 0x13

PIDDSI_CODEPAGE = 1
PIDDSI_CATEGORY = 2
PIDDSI_PRESFORMAT = 3
PIDDSI_BYTECOUNT = 4
PIDDSI_LINECOUNT = 5
PIDDSI_PARACOUNT = 6
PIDDSI_SLIDECOUNT = 7
PIDDSI_NOTECOUNT = 8
PIDDSI_HIDDENCOUNT = 9
PIDDSI_MMCLIPCOUNT = 0xA
PIDDSI_SCALE = 0xB
PIDDSI_HEADINGPAIR = 0xC
PIDDSI_DOCPARTS = 0xD
PIDDSI_MANAGER = 0xE
PIDDSI_COMPANY = 0xF
PIDDSI_LINKSDIRTY = 0x10
PIDDSI_CCHWITHSPACES = 0x11
PIDDSI_SHAREDDOC = 0x13
PIDDSI_LINKBASE = 0x14
PIDDSI_HLINKS = 0x15
PIDDSI_HYPERLINKSCHANGED = 0x16
PIDDSI_VERSION = 0x17
PIDDSI_DIGSIG = 0x18
PIDDSI_CONTENTTYPE = 0x1A
PIDDSI_CONTENTSTATUS = 0x1B
PIDDSI_LANGUAGE = 0x1C
PIDDSI_DOCVERSION = 0x1D

class PIDSI():
    CODEPAGE = 1
    TITLE = 2
    SUBJECT = 3
    AUTHOR = 4
    KEYWORDS = 5
    COMMENTS = 6
    TEMPLATE = 7
    LAST_AUTHOR = 8
    REVNUMBER = 9
    EDIT_TIME = 0xA
    LAST_PRINTED_TIME = 0xB
    CREATE_TIME = 0xC
    SAVE_TIME = 0xD
    PAGE_COUNT = 0xE
    WORD_COUNT = 0xF
    CHAR_COUNT = 0x10
    THUMBNAIL = 0x11
    APPNAME = 0x12
    DOC_SECURITY = 0x13
# end class PIDSI

class PIDDSI():
    CODEPAGE = 1
    CATEGORY = 2
    PRESFORMAT = 3
    BYTECOUNT = 4
    LINECOUNT = 5
    PARACOUNT = 6
    SLIDECOUNT = 7
    NOTECOUNT = 8
    HIDDENCOUNT = 9
    MMCLIPCOUNT = 0xA
    SCALE = 0xB
    HEADINGPAIR = 0xC
    DOCPARTS = 0xD
    MANAGER = 0xE
    COMPANY = 0xF
    LINKSDIRTY = 0x10
    CCHWITHSPACES = 0x11
    SHAREDDOC = 0x13
    LINKBASE = 0x14
    HLINKS = 0x15
    HYPERLINKSCHANGED = 0x16
    VERSION = 0x17
    DIGSIG = 0x18
    CONTENTTYPE = 0x1A
    CONTENTSTATUS = 0x1B
    LANGUAGE = 0x1C
    DOCVERSION = 0x1D
# end class PIDDSI

SUMMARY_INFORMATION_NAME = "\x05SummaryInformation"
DOC_SUMMARY_INFORMATION_NAME = "\x05DocumentSummaryInformation"
